package group2assignone.ucm.manager;

import group2assignone.ucm.UCController;
import group2assignone.view.manager.DeleteFlightView;

/**
 * Use Case: Delete Flight Back                                             <br>
 * Pre-Condition: Manager selects 'Back' from the delete flight view        <br>                                        <br>
 * Post-Condition: UI is updated                                            <br>
 * 1. System clears current delete flight view.                             <br>
 * 2. System returns to previous delete flight view.                     <br>
 *
 * @author group2
 */
public class UCDeleteFlightBack implements UCController {

    private DeleteFlightView deleteView = new DeleteFlightView();

    /**
     * sets view
     * @param dView
     */
    public UCDeleteFlightBack(DeleteFlightView dView) {
        deleteView = dView;
    }
    
    /**
     *Use Case Controller - allows the manager to go back from deleting flight
     */
    @Override
    public void run() {
        //1. System clears current delete flight view.
        deleteView.clearShowFlightWindow();
        //2. System returns to previous delete flight view.
        deleteView.go();
    }
}
